// https://nuxt.com/docs/api/configuration/nuxt-config
import any from "async-validator/dist-types/validator/any";

export default defineNuxtConfig({
  compatibilityDate: '2024-11-01',
  devtools: { enabled: false},
  ssr: true,
  components: true,
  experimental: {
    renderJsonPayloads: false
  },
  // vite: {
  //   server: {
  //     allowedHosts: true,
  //     proxy: {
  //       'service': {
  //         target: 'https://server.starbucket.cn',
  //         changeOrigin: true,
  //         prependPath: true,
  //       }
  //     }
  //   }
  // },
  // 软件配置
  app: {
    head: {
      // SEO优化
      title: "Lin | Starbucket",
      charset: 'utf-8',
      meta: [
        {
          name: "description",
          content: "Starbucket, width=device-width, initial-scale=0, user-scalable=yes,shrink-to-fit=no"
        },
        {
          charset: "utf-8",
        },
        {
          name: "keyword",
          content: "Lin | Starbucket, width=device-width, initial-scale=0, user-scalable=yes,shrink-to-fit=no"
        }
      ],
      // 网页图标
      // link: [
      //   { rel: "icon", type: "image/x-icon", href: "favicon.ico" }
      // ]

    }
  },
  modules: [
    [
      '@pinia/nuxt',
      {
        autoImports: [
          // 自动引入 `defineStore()`
          'defineStore',
          // 自动引入 `defineStore()` 并重命名为 `definePiniaStore()`
          ['defineStore', 'definePiniaStore'],
        ],
      },
    ],
    '@element-plus/nuxt'
  ],
  css: [
    '~/ assets/scss/_variables.scss',
      '~/ assets/scss/_mediaQuery.scss'
  ],
  plugins: [
    { src: '~/plugins/element-plus-icons.ts', mode: 'client' },
    { src: '~/plugins/preview-image.js', mode: 'client' },
  ],





})